package org.tang.data;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;

public class GetStocks {

	static String fileName = "D:\\Program\\dzh2\\userdata\\block\\自选股8.BLK";

	public static void main(String[] args) throws Exception {
		BufferedReader reader = new BufferedReader(new FileReader(new File(
				fileName)));
		String line = null;
		int count = 0;
		while ((line = reader.readLine()) != null) {

			int start = line.indexOf("S");
			if (start > 0) {
				line = line.substring(start, start+8);
				line = line.toLowerCase();
				System.out.println(line);
				
				count++;
			}
		}
		System.out.println(count);
	}

}
